FROM python:3.12-slim

WORKDIR /app

# 安装依赖
COPY app/api/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# 复制应用代码
COPY app/ ./app/

# 创建上传和报告目录
RUN mkdir -p uploads reports

# 暴露端口
EXPOSE 5000

# 启动服务
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app.api.server:app", "--timeout", "300"] 
